#include <iostream>
using namespace std;


long long calculateSquareSum(int n) {
    long long sum = 0;
    for (int i = 1; i <= n; ++i) {
        sum += i * i;  
    }
    return sum;
}

int main() {
    int n;
    do {
        cin >> n;
    } while (n <= 0);
    cout << calculateSquareSum(n) << endl;
    return 0;
}


